﻿
Namespace constants
    Namespace text_based
        Public Enum type As Byte
            text = 0
        End Enum
    End Namespace
End Namespace

Namespace text_based
    Public Module _text_based
        Public Function [case](ByVal c As Char) As [case]
            Return New [case](constants.text_based.type.text, Convert.ToInt32(c))
        End Function

        Public Function write(ByVal s As String) As [case]()
            If isemptystring(s) Then
                Return Nothing
            Else
                Dim rtn() As [case] = Nothing
                ReDim rtn(strlen(s) - 1)
                For i As Int64 = 0 To rtn.Length() - 1
                    rtn(i) = [case](s(i))
                Next
                Return rtn
            End If
        End Function

        Public Function writeline(ByVal s As String) As [case]()
            Return write(strcat(s, newline.incode()))
        End Function
    End Module
End Namespace